alert('SceneScene4.js loaded');
//GESTION TEXT ///
/*
var CurrentScene="Scene4";
var _count = 1;
var type="";
var compteur= 0; // Compteur ligne 
var scene = "4/4-a.json";  //Nom de la scene initiatrice */


var file = "app/javascript/TextManager.js";
var attributes = {charset:"utf-8"};

var tmp;
var cpt;
 
include(file, attributes);

function SceneScene4() {

};

SceneScene4.prototype.initialize = function () {
	alert("SceneScene4.initialize()");
	// this function will be called only once when the scene manager show this scene first time
	// initialize the scene controls and styles, and initialize your variables here
	// scene HTML and CSS will be loaded before this function is called
	sf.scene.show('ToolBar');

};

SceneScene4.prototype.handleShow = function (data) {
	alert("SceneScene4.handleShow()");
	// this function will be called when the scene manager show this scene
	IdScene ="1";	
	CurrentScene ="Scene4";
	SceneReset(CurrentScene,-1);
};

SceneScene4.prototype.handleHide = function () {
	alert("SceneScene4.handleHide()");
	// this function will be called when the scene manager hide this scene
};

SceneScene4.prototype.handleFocus = function () {
	alert("SceneScene4.handleFocus()");
	// this function will be called when the scene manager focus this scene
};

SceneScene4.prototype.handleBlur = function () {
	alert("SceneScene4.handleBlur()");
	// this function will be called when the scene manager move focus to another scene from this scene
};

SceneScene4.prototype.handleKeyDown = function (keyCode) {
	alert("SceneScene4.handleKeyDown(" + keyCode + ")");
	// TODO : write an key event handler when this scene get focued
	switch (keyCode) {
		case sf.key.LEFT:

			break;
		case sf.key.RIGHT:

			break;
		case sf.key.UP:
			break;
		case sf.key.DOWN:
			break;
		case sf.key.ENTER:

			Enter();

			break;
		case sf.key.RETURN:
			event.preventDefault();
			sf.scene.hide('Scene4');
			sf.scene.show('MapQueensPark');
			sf.scene.focus('MapQueensPark');
			break;
		default:
			alert("handle default key event, key code(" + keyCode + ")");
			break;
	}
};


